<template>
  <el-row type="flex" align="middle" class="title-item file-preview">
    <div class="picture">
      <el-image :src="row.cover_url">
        <el-row slot="error" type="flex" align="middle" justify="center" class="image-slot"><i class="el-icon-picture-outline" /></el-row>
      </el-image>
    </div>
    <el-row type="flex" justify="space-between" class="info">
      <el-tooltip effect="dark" :content="row.title" placement="bottom-start">
        <div class="name">{{ row.title }}</div>
      </el-tooltip>
    </el-row>
  </el-row>
</template>

<script>
export default {
  props: {
    row: {
      type: Object,
      default: _ => {
        return {};
      }
    }
  }
};
</script>

<style lang="scss" scoped>
.title-item {
  width: max-content;
  .picture {
    margin-right: 10px;
    padding-top: 60px;
    width: 80px;
    height: 0;
    position: relative;
    .el-image {
      width: 100%;
      height: 100%;
      position: absolute;
      left: 0;
      top: 0;
      ::v-deep.image-slot {
        height: 100%;
        font-size: 20px;
        color: #909399;
        background: #f5f7fa;
      }
    }
  }
  .info {
    flex: 1;
    flex-direction: column;
    //height: 55px;
    .name {
      width: 182px;
      font-size: 14px;
      color: #333;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
  }
}
</style>
